<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>registUser</title>
    <link rel="stylesheet" type="text/css" href="Assets/css/password.css"/>
    <script src="jquery-1.11.2.min.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
        .wb-logo{
            position: relative;
            top: -100px;
            left: 90px;
        }
    </style>
</head>
<body>
    <form id="myForm">
        <div class="login">
            <div class="content clearfix">
                <div class="content-left">
                    <div class="wb-logo">
<!--                        <img src="Assets/images/wb-logo_03.png" ><br>-->
                    </div>

                    <div class="logo">
                        <img src="Assets/images/gflogo.png" alt="" style="border-radius: 69px 69px;"/>
                        <p>陕西国防工业职业技术学院<br>就业管理系统</p>
                    </div>
                </div>
                <div class="shu"></div>
                <div class="content-right">
                    <div class="login-form">
                        <h2>/LOGIN</h2>
                        <div class="identifire">
                            <span>手机号：</span>
                            <input type="text" name="phonenum"/>
                        </div>
                        <div class="account clearfix">
                            <span>身份证号：</span>
                            <input type="text"  name="username" />
                        </div>
                        <div class="password clearfix">
                            <span>输入新密码：</span>
                            <input type="password"  name="password"/>
                        </div>
                        <div class="code clearfix">
                            <span>确认新密码：</span>
                            <input type="text"  name=""/>
                        </div>
                        <div class="btn">
                            <span><button style="border: none ;background:#4fadeb ;color: #F7FBFF" type="submit">提交并登录</button></span>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </form>
</body>
    <script language="javascript" src="jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="jquery-form.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#myForm').ajaxForm({
                    // url:'http://localhost/lr3181/registUser.php',
                    url:"http://localhost:63342/WWW/lr3181/registUser.php",
                    type:'POST',
                    data:$('#myForm').serialize(),
                    dataType:'JSON',
                    success:function (data) {
                        if (data['result']=='username is exist'){
                                alert(data['username']+'用户名已存在');
                        }else {
                             if (data['result']=='success'){
                                 alert('恭喜您注册成功！');
                                 window.location='http://localhost:63342/WWW/lr3181/index.html';
                             }else{
                                 alert('对不起，注册失败！');
                             }
                        }
                    },
                    error:function (err) {
                        alert('请求失败！');
                        console.log(err)
                    }
            });
        });
    </script>
</html>